#pragma once

#include "treewalker.h"

class CTextStream;
class Driver;
class Uic;

struct Option;


struct WriteDeclaration : public TreeWalker
{
    WriteDeclaration(Uic *uic, bool activateScripts);

    void acceptUI(DomUI *node) override;
    void acceptWidget(DomWidget *node) override;
    void acceptSpacer(DomSpacer *node) override;
    void acceptLayout(DomLayout *node) override;
    void acceptActionGroup(DomActionGroup *node) override;
    void acceptAction(DomAction *node) override;
    void acceptButtonGroup(const DomButtonGroup *buttonGroup) override;

private:
    Uic *m_uic;
    Driver *m_driver;
    CTextStream &m_output;
    const Option &m_option;
    const bool m_activateScripts;
};
